-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated dbmigrate to obtain source db type from config.toml #1258
Updated dbmigrate to obtain source db type from config.toml #1258
Conversation
…from the config.toml. This was done because it was hard to distinguish between goleveldb and cleveldb.
…o test for SourceDBType.
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1258 +/- ##
==========================================
- Coverage 58.46% 58.46% -0.01%
==========================================
Files 206 206
Lines 25258 25264 +6
==========================================
+ Hits 14768 14771 +3
- Misses 9395 9398 +3
Partials 1095 1095
|
… the same pattern as TargetDB. This also reverts some of the changes to Initialize because they are no longer needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to add change log.
A little background here. I originally wrote it this way (or at least tried) because of the uncertainty around how the db type is configured, and a desire for the core db-migration functionality to be as portable as possible. That is, I tried to write it so that it could convert any databases, not just ones specific to Cosmos. Looking back, there were definitely some flaws in that thinking. Here's where things can get tricky though. There's two places where the db type can be configured that affect different db directories:
If I'm remembering correctly, the Additionally, it's not uncommon to get a data dir, but not the configs associated with it. So I often didn't know what type it was. |
4e71f35
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Description
It was hard for dbmigrate to differentiate between goleveldb and cleveldb. I updated the code to take the db source type from the config.toml instead of attempting to detect it.
closes: #1257
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes